-- Viral Resistance - T-Engine 4 Module
-- Copyright (C) 2010 Mikolai Fajer
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
--
-- Mikolai Fajer "yufra"
-- mfajer@gmail.com

newChat{ id="first",
	text = [[#LIGHT_GREEN#You pick up the receiver of the red phone and can hear several clicking noises.  Then a voice answers:
#WHITE#"Military Headquarters..."]],
	answers = {
		{([["This is Corporal %s at Camp White Hill.  We have lost power and there is some sort of infection spreading."]]):format(game.player.name),
			jump = "debrief",
			cond=function(npc, player)
				return player:isQuestStatus("headquarters", engine.Quest.PENDING, "first contact")
			end
		},
		{"#LIGHT_BLUE#Hang up."},
	}
}

newChat{ id="debrief",
	text = [[#LIGHT_GREEN# A short pause is followed by "Corporal, I am transferring you to General Edwards.  Please hold."  #LIGHT_GREEN# A few more clicks and then a gruff voice breaks in.  "Corporal @playername@, fill me in."]],
	answers = {
		{"#LIGHT_BLUE#Debrief",
			jump = "orders",
		},
		{"#LIGHT_BLUE#Hang up."},
	}
}

newChat{ id="orders",
	text = [[#LIGHT_GREEN# You describe the situation. "Corporal, we need to know what we are dealing with.  Your mission is to restore power to the building, extract a blood sample from one of the infected and analyze it in the labs.  My records show Dr. Tennum, the head of the laboratory, is trained in handling infectious diseases and should be able to assist you.  Support will be mobilized and be ready to rescue you once you have completed your mission."]],
	answers = {
		{[["Yes, sir."]],
			jump = "dismissal",
			action = function(npc, player)
				player:setQuestStatus("headquarters", engine.Quest.COMPLETED, "first contact")
				player:setQuestStatus("headquarters", engine.Quest.PENDING, "find tennum")
				player:setQuestStatus("headquarters", engine.Quest.PENDING, "restore power")
				player:setQuestStatus("headqaurters", engine.Quest.PENDING, "collect sample")
			end,
			
		},
		{"#LIGHT_BLUE#Hang up."},
	}
}

newChat{ id="dismissal",
	text = [["That is all soldier, and good luck." #LIGHT_GREEN# The phone goes silent.]],
	answers = {
		{"#LIGHT_BLUE#Hang up."},
	}
}

return "first"